package com.gmail.blackdog1987.carcare.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.gmail.blackdog1987.carcare.service.SmsService;

@Component
public class SMSTask {
	@Autowired
	private SmsService smsService;
	
	@Scheduled(cron = "0/5 * * * * *")
	public synchronized void job(){
		smsService.doSendSMS();
	}
}
